<?php

class Logger extends Podcast {

	public static function add($msg="") {
		$file = self::$logfile;

		$current = file_get_contents($file);
		
		(self::$episode == "") ? $content = self::$podcast : $content = self::$podcast." - ".self::$episode;
		($msg != "") ? $content = $msg : true;
		
		$content = urldecode($content);

		$new = date("d.m.Y H:i:s ", time()).$content."\n".$current;

		file_put_contents($file, $new);
	}
}

?>